package lol.clann.minecraft.springboot.bukkit.utils;

import lombok.Getter;

/**
 *
 * @author pyz
 * @date 2019/5/2 10:42 PM
 */
public class CraftClasses {
    @Getter
    private static final Class CraftPlayer;
    @Getter
    private static final Class CraftWorld;
    @Getter
    private static final Class CraftChunk;
    @Getter
    private static final Class CraftItemStack;
    @Getter
    private static final Class CraftEntity;
    @Getter
    private static final Class CraftServer;
    @Getter
    private static final Class CraftInventoryView;
    @Getter
    private static final Class CraftInventory;
    @Getter
    private static final Class CraftBlock;

    static {
        try {
            CraftPlayer = NMSReflectUtils.forName("{cb}.entity.CraftPlayer");
            CraftWorld = NMSReflectUtils.forName("{cb}.CraftWorld");
            CraftChunk = NMSReflectUtils.forName("{cb}.CraftChunk");
            CraftItemStack = NMSReflectUtils.forName("{cb}.inventory.CraftItemStack");
            CraftEntity = NMSReflectUtils.forName("{cb}.entity.CraftEntity");
            CraftServer = NMSReflectUtils.forName("{cb}.CraftServer");
            CraftInventoryView = NMSReflectUtils.forName("{cb}.inventory.CraftInventoryView");
            CraftInventory = NMSReflectUtils.forName("{cb}.inventory.CraftInventory");
            CraftBlock = NMSReflectUtils.forName("{cb}.block.CraftBlock");
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
